<template>
	<view class="follow">
		<view class="list">
			<view class="follow-item" v-for="(item, index) in dataObj.list" :key="index">
				<image class="head-img" :src="item.logo"></image>
				<view class="item">
					<view class="item-date">{{item.linkman}}</view>
					<view class="address">{{item.store_name}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				dataObj: {
					list: []
				}
			}
		},
		onLoad() {
			this.getData();
		},
		methods: {
			// 获取数据
			getData() {
				this.$Requset({
					url: this.$Api['user']['company'],
					data: {
						page: 1,
						limit: 20
					},
					success: (res) => {
						console.log(res);
						const {
							data,
							status,
							msg
						} = res;
						if (!status) {
							requestErrorTip('toast', msg);
							return;
						}
						this.dataObj['list'] = this.dataObj['list'].concat(data['datas']);
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	page {
		background-color: #f7f7f7;
	}

	.follow {
		padding-top: 18rpx;

		.list {
			padding: 0 30rpx;
			border-radius: 22rpx;
			background-color: #FFFFFF;
			margin-bottom: 18rpx;

			.follow-item {
				display: flex;
				align-items: center;
				border-bottom: 1rpx solid #F3F3F3;
				padding: 28rpx 0;
				
				&:last-child {
					border-bottom: 0;
				}

				.head-img {
					width: 100rpx;
					height: 100rpx;
					margin-right: 20rpx;
					// background-color: #ccc;
				}

				.item {
					font-size: 24rpx;

					.item-date {
						font-size: 28rpx;
						margin-bottom: 6rpx;
					}

					.address {
						color: #7F7F7F;
					}
				}
			}
		}
	}
</style>
